Skip to main content

Send Message

AutomatR.MicrosoftTeams.Activities.SendMessage

The "Send Message" activity in AutomatR's Microsoft Teams package allows you to send messages through chat or a channel in Microsoft Teams. This activity facilitates communication within Teams, enabling automation workflows to interact with team members seamlessly.

Properties

NameDescription
Input
Channel IDSpecifies the unique identifier (ID) of the channel where the message will be sent. String variables containing the channel ID.
Team IDSpecifies the unique identifier (ID) of the team to which the channel belongs. String variables containing the team ID.
Chat IDSpecifies the unique identifier (ID) of the chat where the message will be sent. String variables containing the chat ID.
MessageSpecifies the text of the message you want to send. String variables containing the message text.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Send Message" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Ex.: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1.
Output
ResultOutputs a Microsoft.Graph.ChatMessage object representing a chat message in Microsoft Teams. The object contains information such as content, sender, timestamp, and attachments. Variables of relevant types (e.g., Microsoft.Graph.ChatMessage variables) to store the sent message details.

How to use:

  1. Drag and drop the "Send Message" activity onto the workflow.
  2. Configure the properties by specifying the team ID, channel ID, chat ID, and the text of the message.
  3. Optionally, configure the delay.
  4. Execute the workflow to send the specified message within Microsoft Teams.

Example: Consider an example where the "Send Message" activity is used to send a message in a Teams channel:

Send Message:
Delay: 2
Team ID: "abcd1234"
Channel ID: "efgh5678"
Message: "Hello Team! This is an automated message."
Result: sentMessageDetails

In this example, the activity waits for 2 seconds before executing, sends the message "Hello Team! This is an automated message" to the channel with the ID "efgh5678" within the team with the ID "abcd1234." The details of the sent message are stored in the Microsoft.Graph.ChatMessage variable "sentMessageDetails" for further handling in the workflow.